<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="../header.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>${systemName }</title>
    <link rel="shortcut icon" href="${contextPath}/resources/favicon.ico"> 
    <link href="${contextPath}/resources/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${contextPath}/resources/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <!-- Data Tables -->
    <link href="${contextPath}/resources/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/animate.min.css" rel="stylesheet">
    <link href="${contextPath}/resources/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/plugins/simditor/simditor.css" />
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
       <div class="ibox-content">
        <form action="${contextPath}/system/good/update" class="form-horizontal" name="searchFrom" enctype="multipart/form-data" method="post" id="signupForm"> 
        	<div class="form-group">
                <label class="col-sm-2 control-label">商品名称:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="title" name="title" value="${good.title }"  >
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>这里写点提示的内容</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品摘要:</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="subject" id="subject" value="${good.subject }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品描述:</label>
                <div class="col-sm-10">
                	<textarea id="description" class="form-control required" name="description" placeholder="这里输入商品描述" >
                	${good.description }
                    </textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">销售价格:</label>
                <div class="col-sm-10">
                    <input type="number" class="form-control" name="salePrice" id="salePrice" value="${good.salePrice }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">市场价格:</label>
                <div class="col-sm-10">
                    <input type="number" class="form-control" name="marketPrice" id="marketPrice" value="${good.marketPrice }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">成本价格:</label>
                <div class="col-sm-10">
                    <input type="number" class="form-control" name="costPrice" id="costPrice" value="${good.costPrice }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">提成比例:</label>
                <div class="col-sm-10">
                    <input type="number" class="form-control" name="percentageRate" id="percentageRate" value="${good.percentageRate }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">库存:</label>
                <div class="col-sm-10">
                    <input type="number" class="form-control" name="amount" min="0" max="9999" id="amount" value="${good.amount }">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品图片</label>
                <div class="col-sm-10">
                    <c:forEach items="${good.goodsImageList}" var="image" varStatus="vs"> 
                            <img alt="" src="${image.imageLarge}" width="200" height="200">
                     </c:forEach>
                </div>
            </div>
            <div class="form-group">
                    <label class="col-sm-2 control-label">商品所属分类</label>
                    <div class="col-sm-10">
                       <c:forEach items="${good.categoryList}" var="category" varStatus="vs">  
                            <input type="text"  value="${category.title }" >
                       </c:forEach>
                    </div>
             </div>
            
             <label class="col-sm-2 control-label">商品规格</label>
           		 <c:forEach items="${good.specifications}" var="goodsSpecification" varStatus="vs">  
            		 <div class="ibox-content" style="border:1px dashed #000 ;">
            		 	 <div class="form-group">
                    <label class="col-sm-2 control-label">规格名称</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${goodsSpecification.name }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">市场价</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${goodsSpecification.marketPrice }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">售卖价</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${goodsSpecification.salePrice }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">库存</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${goodsSpecification.amount }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">描述</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${goodsSpecification.desc }" >
                    </div>
             	</div>
             	<div class="form-group">
                    <label class="col-sm-2 control-label">提成比例</label>
                    <div class="col-sm-4">
                      	<input type="text"  value="${goodsSpecification.percentageRate }" >
                    </div>
             	</div>
             </div>
                  </c:forEach>
        
        
        	
        
        </form>
        </div>
    </div>
    <script src="${contextPath}/resources/js/jquery.min.js?v=2.1.4"></script>
    <script src="${contextPath}/resources/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="${contextPath}/resources/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="${contextPath}/resources/js/plugins/validate/messages_zh.min.js"></script>
    <script src="${contextPath}/resources/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="${contextPath}/resources/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="${contextPath}/resources/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="${contextPath}/resources/js/content.min.js?v=1.0.0"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/module.js"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/uploader.js"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/hotkeys.js"></script>
    <script type="text/javascript" src="${contextPath}/resources/js/plugins/simditor/simditor.js"></script>
    <script type="text/javascript">
    </script>
</body>
</html>
